﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Page1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Wizard1.ActiveStepIndex = 0;
            OfficeImageMap.HotSpotMode = HotSpotMode.PostBack;
        
            RectangleHotSpot cubicleA = new RectangleHotSpot();
            cubicleA.Top = 0;
            cubicleA.Bottom = 105;
            cubicleA.Left = 0;
            cubicleA.Right = 123;
            cubicleA.PostBackValue = "cubicleA";
            OfficeImageMap.HotSpots.Add(cubicleA);

            RectangleHotSpot cubicleB = new RectangleHotSpot();
            cubicleB.Top = 0;
            cubicleB.Bottom = 105;
            cubicleB.Left = 124;
            cubicleB.Right = 262;
            cubicleB.PostBackValue = "cubicleB";
            OfficeImageMap.HotSpots.Add(cubicleB);

            RectangleHotSpot cubicleC = new RectangleHotSpot();
            cubicleC.Top = 0;
            cubicleC.Bottom = 105;
            cubicleC.Left = 263;
            cubicleC.Right = 382;
            cubicleC.PostBackValue = "cubicleC";
            OfficeImageMap.HotSpots.Add(cubicleC);

            RectangleHotSpot cubicleD = new RectangleHotSpot();
            cubicleD.Top = 164;
            cubicleD.Bottom = 286;
            cubicleD.Left = 258;
            cubicleD.Right = 382;
            cubicleD.PostBackValue = "cubicleD";
            OfficeImageMap.HotSpots.Add(cubicleD);

            RectangleHotSpot cubicleE = new RectangleHotSpot();
            cubicleE.Top = 164;
            cubicleE.Bottom = 286;
            cubicleE.Left = 135;
            cubicleE.Right = 257;
            cubicleE.PostBackValue = "cubicleE";
            OfficeImageMap.HotSpots.Add(cubicleE);

            RectangleHotSpot cubicleF = new RectangleHotSpot();
            cubicleF.Top = 164;
            cubicleF.Bottom = 286;
            cubicleF.Left = 0;
            cubicleF.Right = 134;
            cubicleF.PostBackValue = "cubicleF";
            OfficeImageMap.HotSpots.Add(cubicleF);

        }
    }
    protected void OfficeImageMap_Click(object sender, ImageMapEventArgs e)
    {
        OfficeSelectedLabel.Text = e.PostBackValue;
    }
    protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e)
    {
        Wizard1.Visible = false;
        Response.Write("Thank you!");
    }
    protected void Wizard1_ActiveStepChanged(object sender, EventArgs e)
    {
        if (Wizard1.ActiveStep.Title == "Summary")
        {
            SummaryLabel.Text = String.Format("Summary Info: <br />Room: {0}<br />Delivery Date: {1}",
                OfficeSelectedLabel.Text, ServiceDateCalendar.SelectedDate.ToShortDateString());
        }
    }
}